<?php
/**
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
* @property CI_DB_active_record $db
*/
class Shifthandle extends CI_Model
{
  /**
   *
   * @param <type> $appid
   * @param <type> $empid
   * @param <type> $code
   * @return <type>
   */
    function insert($appid,$empid,$code)
    {

        $this->db->set('appid',$appid);
       // $this->db->set('applydate','NOW()',false);
        $this->db->set('empid',$empid);
        $this->db->set('code',$code);
        $this->db->insert('shifthandle');

        //return $this->db->insert_id();
    }
    function change_exchange($appid,$code)
    {
        $this->load->model("Employee");
        $de = $this->Employee->get_DE($code);
        $this->db->set('empid',$de);
        $this->db->set('code',$code);
        $this->db->where('appid',$appid);
        $this->db->update('Shifthandle');
    }

}
?>